import { httpMultipart,httpForm } from "@/request/http";

//根据币种获取链地址
const getBlock = (params) => {
    return httpForm({
        url: "api/channelBlockchain!getBlockchainName.action",
        method: "post",
        isLoading: false
    }, params)
};

//获取session_token
const getRechargeToken = (params) => {
    return httpForm({
        url: "api/rechargeBlockchain!recharge_open.action",
        method: "post",
        isLoading: false
    }, params)
};

//充值申请
const rechargeApply = (params) => {
    return httpForm({
        url: "api/rechargeBlockchain!recharge.action",
        method: "post",
        isLoading: false
    }, params)
};


//充值详情
const getRechargeDetail = (params) => {
    return httpForm({
        url: "api/rechargeBlockchain!get.action",
        method: "post",
        isLoading: false
    }, params)
};

//充值记录
const getRechargeList = (params) => {
    return httpForm({
        url: "api/rechargeBlockchain!list.action",
        method: "post",
        isLoading: false
    }, params)
};


const uploadImages = (params) => {
    return httpForm({
        url: "/public/uploadimg!execute.action",
        method: "post",
        isLoading: true
    }, params)
};

// 获取充值说明
const getRechargeTips = (params) => {
    return httpForm({
        url: "api/cms!get.action",
        method: "post",
        isLoading: false
    }, params)
};
// 获取用户提现地址
const _getWithdrawAddress = (params) => {
    return httpForm({
        url: "api/withdraw!getAddress.action",
        method: "post",
        isLoading: false
    }, params)
};
// 绑定提现地址
const _bindWithdrawAddress = (params) => {
    return httpForm({
        url: "api/withdraw!bindAddress.action",
        method: "post",
        isLoading: false
    }, params)
};


export default {getRechargeTips, getBlock,getRechargeToken,rechargeApply,getRechargeDetail,getRechargeList,uploadImages,_getWithdrawAddress,_bindWithdrawAddress }
